package control;

import interfaces.ViewPanel;

import java.util.Vector;

//@author A0098891H
public class ViewPanelManager {
	private Vector<ViewPanel> _panelList = null;
	public ViewPanelManager()
	{
		_panelList = new Vector<ViewPanel>();
	}
	
	
	public void register(ViewPanel panel)
	{
		_panelList.add(panel);
	}
	
	public void updateAll()
	{
		for(ViewPanel panel: _panelList)
		{
			panel.updateAll();
		}
	}

    public void updateExpense()
    {
		for(ViewPanel panel: _panelList)
		{
			panel.updateExpense();
		}
    	
    }
    public void updateIncome()
    {
		for(ViewPanel panel: _panelList)
		{
			panel.updateIncome();
		}
    	
    }
    public void updateLoan()
    {
		for(ViewPanel panel: _panelList)
		{
			panel.updateLoan();
		}
    }
    public void updateCategory()
    {
		for(ViewPanel panel: _panelList)
		{
			panel.updateCategory();
		}
    	
    }
    public void updateMember()
    {
		for(ViewPanel panel: _panelList)
		{
			panel.updateMember();
		}
    }
    public void updatePayMethod()
    {
		for(ViewPanel panel: _panelList)
		{
			panel.updatePayMethod();
		}
    }

    public void updateTable()
    {
		for(ViewPanel panel: _panelList)
		{
			panel.updateTable();
		}
    }
}
